Skip to content

test: run Spring smoke tests against shaded artifact - #2385

Open
zeitlinger wants to merge 8 commits into
prometheus:mainfrom
zeitlinger:agent/fix-spring-protobuf-runtime
Open

test: run Spring smoke tests against shaded artifact#2385
zeitlinger wants to merge 8 commits into
prometheus:mainfrom
zeitlinger:agent/fix-spring-protobuf-runtime

Conversation

@zeitlinger

@zeitlinger zeitlinger commented Aug 17, 2026

Copy link
Copy Markdown
Member

Summary

  • run the Spring Boot smoke tests with Failsafe after the package phase
  • test the packaged, shaded exposition-format artifact instead of reactor target/classes
  • verify that generated messages use the relocated Protobuf runtime
  • explicitly select the Failsafe-named test for the Surefire-based native test task
  • register .mise/envs/* as mise monorepo projects and invoke the native task directly
  • derive native-task repository paths from MISE_MONOREPO_ROOT

Root cause

The smoke test previously ran with Surefire during the test phase. Maven therefore used the
exposition module's unshaded target/classes. The generated Protobuf 4.35.1 classes then loaded
against Spring Boot's managed Protobuf 4.34.2 runtime and failed the runtime compatibility check.

Moving this consumer-style smoke test to Failsafe runs it after packaging, when Maven resolves the
shaded artifact that users receive. This avoids an artificial reactor-only version conflict without
overriding Spring Boot's Protobuf version.

The native test task still invokes the Maven test phase because GraalVM Native Test consumes
Surefire's test configuration. It now selects ApplicationIT explicitly; an inline comment records
why that exception is necessary. The workflow invokes it as
mise //.mise/envs/native:native-test from the repository root.

Impact

There is no production code or published dependency change. The smoke test now more accurately
represents a Spring Boot application consuming the packaged client library.

Validation

  • reproduced the original failure on main
  • mise run lint:fix
  • ./mvnw verify -pl integration-tests/it-spring-boot-smoke-test -am -Dcoverage.skip=true -Dwarnings=-nowarn
  • mise run build
  • mise run --skip-deps //.mise/envs/native:native-test -- -DskipTests
  • native-image generation passed the previous missing-test-configuration failure locally; final
    linking could not run because the local environment does not provide the static zlib artifact

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger changed the title fix: align Spring smoke test protobuf runtime test: run Spring smoke tests against shaded artifact Aug 18, 2026
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger
zeitlinger marked this pull request as ready for review August 18, 2026 08:11
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant